module globalarray
    implicit none
    !the common used parameters
    REAL (KIND=RKIND) , parameter  ::  &
    pi=3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148,  &
    Eps0=8.8541878176203898505365630317107502606083701665994498081024171524053950954599821142852891607182008932e-12, &
    Mu0=1.2566370614359172953850573533118011536788677597500423283899778369231265625144835994512139301368468271e-6, &
    cluz=2.99792458e8, &
    zvac=376.7303134617706554681984004203193082686235083524186552320746382967072692213076988801668751995655867, &
    !defin some constant for use

    !the storage field array
    real, save, allocatable, pointer,dimension(:,:) :: Ex, Ey, Hz
    real, save, allocatable, pointer,dimension(:,:) :: Dx, Dy, Bz

    !the material array
    integer, save, allocatable, dimension(:,:) :: MediumMatrix
    !mediumMatrix=0 ---freespace
    !mediumMatrix=1 ---dielectric
    !mediumMatrix=2 ---Metal
    !medimuMatrix=3 ---CPML
      !!update algorithm
        !!
    !the matrix Gridtype is used to define the which type grid it is : pml, metal, dispersive media, or other
end module globalarray
